#ifndef COMPLEXEDITOR
#define COMPLEXEDITOR

#include <QWidget>
#include <complex>

class ComplexEditorPrivate;
class ComplexEditor : public QWidget
{
Q_OBJECT
public:
    explicit ComplexEditor(QWidget* parent = nullptr);
    ~ComplexEditor();

    std::complex<double> value() const;
    void setValue(const std::complex<double>& val);


protected:
    void showEvent(QShowEvent *);

private:
    ComplexEditorPrivate* d_ptr;
    Q_DISABLE_COPY(ComplexEditor)
};

#endif // COMPLEXEDITOR
